package pattern.factory.pizzaStore

import pattern.factory.pizza.Pizza

/**
 * Created by root on 15-9-7.
 */
abstract class PizzaStore {

  def orderPizza(pizzaType:String) = {
    val pizza = createPizza(pizzaType)
    pizza.prepare()
    pizza.bake()
    pizza.cut()
    pizza.box()
    pizza
  }

  protected def createPizza(pizzaType:String):Pizza
}
